const { defineConfig } = require('@vue/cli-service')

module.exports = defineConfig({
  transpileDependencies: true,
  lintOnSave: false,
  devServer: {
    port: 8000,
    proxy: {
      '/api': {
        target: 'http://localhost:8080',
        changeOrigin: true
      },
      '/users': {
        target: 'http://localhost:8081',
        changeOrigin: true
      },
      '/prizes': {
        target: 'http://localhost:8082',
        changeOrigin: true,
        pathRewrite: {
          '^/prizes': '/api/prizes'
        }
      }
    }
  }
})